<template>
	<section class="express border-box" v-if='data'>
		<div class="express-contain">
			<div class="layout border-b20 container pt15 pb15">
				<div class="pos-rel mr10">
					<img style="width:5rem;height: 5rem;" :src="data.goods_picture" alt="物流" class="responsive-img">
					<p class='pos-abs bottom0 full-width white align-center' style="background-color: rgba(0,0,0,.1)">
						共{{ data.count }}件商品
					</p>
				</div>
				<div class="flex_1">
					<p class="fs15 black pt5">
						物流状态：<i class="subject">{{ data.status }}</i>						
					</p>
					<p class="fs14 c666 pt5">
						承运来源：{{data.company_name}}
					</p>
					<p class="fs14 c666 pt5">
						运单号：{{data.logistic_code}}
					</p>
				</div>
			</div>	
			<ul class="container">
				<li v-for="(item, index) in data.content" class="flex-left " :class="{ red: index == 0}">
					<div class="circle-list">
						<p class="line" 	 :class="{lactive: index == 0}"></p>
						<span class="circle" :class="{cactive: index == 0}"></span>
						<p class="line" :class="{lactive: data.content.length - 1 == index}"></p>
					</div>
					<div class="border-b pt10 pb10 full-width">
						<p>
							{{item.AcceptStation}}
						</p>
						<p>
							{{item.AcceptTime}}
						</p>
					</div>
				</li>
			</ul>						
		</div>			
	</section>
</template>

<script>
	export default
	{
		data()
		{
			return{
				data: [],
				img_url: process.env.IMG_URL,
			}
		},
		methods:
		{
			loadData()
			{
				let params = {
					type 		: 0,
					order_id 	: this.$route.query.order_id,
				}
				this.$http.get('/UserAddress/getpakageExpess',{ params : params }).then(res => {
					this. data = res.data;
				})
			}	
		},
		created()
		{
			this.loadData();
		}
	}
	
</script>

<style lang="less">
.express{
	.express-contain{
		.circle-list{
			display: inline-block;
			width: 5rem;
			height: 100%;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			.line{
				width: 1px;
				height: 2.5rem;
				border-left: 1px solid #eee;
			}
			.lactive{
				border-left-color: white;
			}
			
			.circle{
				display: block;
				width: 5px;
				height: 5px;
				background-color: #eee;
				border-radius: 100%;
				margin-left: -1px;	
			}	
			.cactive{
				width: 10px !important;
				height: 10px !important;
				background-color: #ea2000;
				border-radius: 50%;
			}		
			
		}
	}
}
</style>

